package com.example.broadcast.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.VibratorManager
import android.widget.Toast
import androidx.annotation.RequiresApi

class StaticRegisteredReceiver : BroadcastReceiver() {
    @RequiresApi(Build.VERSION_CODES.S)
    override fun onReceive(context: Context?, intent: Intent?) {
        context?.let {

            val systemService: VibratorManager =
                it.getSystemService(Context.VIBRATOR_MANAGER_SERVICE) as VibratorManager
            Toast.makeText(it, "StaticRegisteredReceiver 收到广播", Toast.LENGTH_SHORT).show()


        }
    }
}